<?php
class BannerWidget extends CWidget
{
    public function run()
    {       
    	$result = $this->getBanners();
        $this->render('banner',array('data' => $result));
    }
    public function getBanners()
    {
    	$banner = Banner::model()->findAll();
    	return $banner;
    }
}